package com.alks.function.mapper.stockdept.pcfactorystockquery;

import com.alks.entity.data.entity.MpPurDis;
import com.alks.function.data.dto.procurement.PurchaseOrderDto;
import com.alks.function.data.request.procurement.*;
import com.alks.function.data.request.stockdept.pcfactorystockwork.MyOrdUpRequest;
import com.alks.function.data.request.stockdept.pcfactorystockwork.PurDisAddRequest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

public interface SD_SQ_MpPurDisMapper extends BaseMapper<MpPurDis> {
    /*写入代发明细*/
    void fdPurDisAdd(@Param("request") List<PurDisAddRequest> request, @Param("userName") String userName, @Param("now") LocalDateTime now);

    /*生成订单*/
    void creatPurUpdate(@Param("request") List<MyOrdUpRequest> request);

    /*生成订单*/
    int creatPurUpdate1(@Param("request") List<MyOrdUpRequest> request);

    List<String> getFitReamarkQuery();

    /*写入代发明细：材料请购作业批处理*/
    int fdPurDisAddByMClearan(@Param("request") List<LotNoRequest5> request, @Param("userName") String userName, @Param("now") LocalDate now);

    /*写入代发明细：零星订购作业批处理*/
    int fdPurDisAddBySdClearan(@Param("request") List<NotOrderDetailsRequest> request, @Param("userName") String userName, @Param("now") LocalDate now);

    /*批量编辑订单*/
    int batchUpdatePurchaseOrder(@Param("list") List<PurchaseOrderDto> list);

    /*零星作业生成订单*/
    int creatPurUpdateByLX(List<MyOrdUpRequest> request);

    /*批量编辑订单:材料请购*/
    int batchUpdateOrderByMaterialClearance(List<PurchaseOrderDto> list);

    /*删除:材料暂收表 */
    int fdPurDisDelete(LotNoRequest6 request);

    /*更新:材料暂收表purFlag变成空*/
    int fdPurDisUpdateNull(LotNoRequest6 request);

    /*更新:材料暂收表*/
    int fdPurDisUpdateNum(LotNoRequest7 request);

    /*批量删除:材料暂收表      MP_PUR_DIS*/
    int fdPurDisDeleteBatch(List<LotNoRequest6> list, String companyId);

    /*改:材料暂收表 */
    int updateFdPurDisAdd(PurchaseOrderDto dto);

    /*批量改厂商*/
    int batchUpdateOrderOfVendor(List<String> list, String vendorNo, String vendorName);


}
